A study of evaluation order semantics in expressions with side effects

نویسندگان

  • Nikolaos S. Papaspyrou
  • Dragan Macos
چکیده

The presence of side effects in even a very simple language of expressions gives rise to a number of semantic questions. The issue of evaluation order becomes a crucial one and, unless a specific order is enforced, the language becomes non-deterministic. In this paper we study the denotational semantics of such a language under a variety of possible evaluation strategies, from simpler to more complex, concluding with unspecified evaluation order, unspecified order of side effects and the mechanism of sequence points that is particular to the ANSI C programming language. In doing so, we adopt a dialect of Haskell as a metalanguage, instead of mathematical notation, and use monads and monad transformers to improve modularity. In this way, only small modifications are required for each transition. The result is a better understanding of different evaluation strategies and a unified way of specifying their semantics. Furthermore, a significant step is achieved towards a complete and accurate semantics for ANSI C.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Denotational Semantics of Evaluation Order in Expressions with Side Effects

The presence of side effects in even a very simple language of expressions gives rise to a number of semantic questions. The issue of evaluation order becomes a crucial one and, unless a strict order is enforced, the language becomes non-deterministic. In this paper we study the semantics of such a language under a variety of possible evaluation strategies, from simpler to more complex, conclud...

متن کامل

Semantics of Barriers in a Non-strict, Implicitly-parallel Language Semantics of Barriers in a Non-strict, Implicitly-parallel Language

Barriers in parallel languages may be used to schedule parallel activities, control memory usage and ensure proper sequentialization of side-eeects. In this paper we present operational semantics of barriers in Id and pH, which are non-strict, implicitly-parallel, functional languages extended with side-eeects. The semantics are presented as a translation from a source language with barriers in...

متن کامل

Evaluation of the one-year effectiveness and side effects of rituximab in patients with multiple sclerosis in Kermanshah

Background: Multiple sclerosis (MS) is an inflammatory disease affecting the central nervous system. Rituximab (Zytux) is a type of monoclonal antibody against B cells with CD20 antigen that reduces B cells. The present study examined the one-year effectiveness and side effects of Rituximab. Methods: This quasi-experimental clinical trial was conducted from September 2018 to September 2019 in ...

متن کامل

EVALUATION OF SIDE EFFECTS OF LOW DOSE CONTRACEPTIV E PILLS ADMINISTERED BY THE VAGINAL ROUTE

Oral contraceptive pills have several side effects especially on the gastrointestinal tract and liver. Absorption of low dose (LD) pills by the vaginal route avoids the first pass of the steroids through these tracts and probably has fewer side effects. This study was a cohort study for evaluation of side effects and acceptability of LD pills administered by the vaginal route. In a clinical...

متن کامل

P 91: The Evaluation of Serum Level of 25-Hydroxy Vitamin D in Patients under Sodium Valproate Medication

Epilepsy is one of the common neurologic disorders in children. Drug side-effects are one of the important problems in treating patients with epilepsy. Using the antiepileptic medication may cause different side effects such as disorder in bone and vitamin D metabolism. Sodium valproate is one of the antiepileptic medications used widely. Some of its side effects include digestive disorder, inc...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • J. Funct. Program.

دوره 10  شماره 

صفحات  -

تاریخ انتشار 2000